package org.fuys.coder.infrastructure.repository;

import org.fuys.coder.domain.signup.repository.IUserSignUpRepository;
import org.fuys.coder.infrastructure.util.RedisUtil;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @projectName: fuys-low-coder
 * @package: org.fuys.coder.infrastructure.repository
 * @className: UserSignUpRepository
 * @author: WangJing
 * @description: 用户签到仓储
 * @date: 2024/9/6 20:16
 * @version: 1.0
 */
@Service
public class UserSignUpRepository implements IUserSignUpRepository {
    @Resource
    private RedisUtil redisUtil;

    @Override
    public Object getUserSignupInfo(String redisKey, String fieldKey) {
        return redisUtil.hashGet(redisKey,fieldKey);
    }

    @Override
    public void doUserSignup(String redisKey, String field, long value) {
        redisUtil.hashSet(redisKey,field,value);
    }
}
